%%% ------------------------------------------------------------------
%%% Licensed under the Apache License, Version 2.0 (the 'License');
%%%  you may not use this file except in compliance with the License.
%%%  You may obtain a copy of the License at
%%%
%%%      http://www.apache.org/licenses/LICENSE-2.0
%%%
%%% Copyright (c) 2014-2017 dwg <bypf2009@vip.qq.com>
%%%
%%%  Unless required by applicable law or agreed to in writing, software
%%%  distributed under the License is distributed on an 'AS IS' BASIS,
%%%  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%%%  See the License for the specific language governing permissions and
%%%  limitations under the License.
%%%
%%% @doc
%%% @author  dwg <'bypf2009@vip.qq.com'>
%%% @copyright 2014-2017 dwg <bypf2009@vip.qq.com>
%%% @end
%%% created|changed : 2017-02-09 15:55
%%% coding : utf-8
%%% ------------------------------------------------------------------

-define(GUN_TIMEOUT , 5000).

-define(POST_HEADERS, [{<<"content-type">>, <<"application/x-www-form-urlencoded">>}]).
% -define(POST_HEADERS , [
% 	{<<"accept">>, <<"*/*">>}
% 	,{<<"connection">>, <<"keep-alive">>}
% 	,{<<"content-type">>, <<"application/x-www-form-urlencoded">>}
% 	,{<<"cache-control">>, <<"no-cache">>}
% 	,{<<"user-agent">>, <<"Erlang - gun">>}
% ]).

%% 获取域名列表
-define(DES_DOMAIN_ACTION, #{<<"Action">> => <<"DescribeDomains">>}).
-define(DES_DOMAIN, [<<"PageNumber">>, <<"PageSize">>, <<"KeyWord">>, <<"GroupId">>]).

%% %%@doc 获取解析记录列表
-define(DES_DOMAIN_RECORD, [
    <<"DomainName">>, <<"PageNumber">>, <<"PageSize">>, <<"RRKeyWord">>,
    <<"TypeKeyWord">>, <<"ValueKeyWord">>
]).

%% 获取解析记录信息
-define(DES_DOMAIN_RECORD_INFO, [<<"RecordId">>]).

%% 获取子域名的解析记录列表
-define(DES_SUB_DOMAIN_RECORD_INFO, [<<"SubDomain">>, <<"PageNumber">>, <<"PageSize">>, <<"Type">>]).

-define(ADD_DOMAIN_RECORD, [
    <<"DomainName">>, <<"RR">>, <<"Type">>, <<"Value">>,
    <<"TTL">>, <<"Priority">>, <<"Line">>
]).

-define(DELETE_DOMAIN_RECORD, [<<"RecordId">>]).

-define(UPDATE_DOMAIN_RECORD, [
    <<"RecordId">>, <<"RR">>, <<"Type">>, <<"Value">>, <<"TTL">>,
    <<"Priority">>, <<"Line">>
]).
